/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author ylz
 */
@Entity
@Table(name = "news_msgtemplate")
//@NamedQueries({@NamedQuery(name = "NewsMsgTemplate.findAll", query = "SELECT n FROM NewsMsgTemplate n"), @NamedQuery(name = "NewsMsgTemplate.findById", query = "SELECT n FROM NewsMsgTemplate n WHERE n.id = :id"), @NamedQuery(name = "NewsMsgTemplate.findBySpcode", query = "SELECT n FROM NewsMsgTemplate n WHERE n.spcode = :spcode")})
public class NewsMsgTemplate implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "templatename")
    private String templatename;
    @Column(name = "templatemsg")
    private String templatemsg;
    @Column(name = "spcode")
    private String spcode;
    @Column(name = "templatepicture")
    private String templatepicture;
    
    public NewsMsgTemplate() {
    }

    public NewsMsgTemplate(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTemplatename() {
        return templatename;
    }

    public void setTemplatename(String templatename) {
        this.templatename = templatename;
    }

	public String getTemplatemsg() {
        return templatemsg;
    }

    public void setTemplatemsg(String templatemsg) {
        this.templatemsg = templatemsg;
    }

    public String getSpcode() {
        return spcode;
    }

    public void setSpcode(String spcode) {
        this.spcode = spcode;
    }

    public String getTemplatepicture() {
        return templatepicture;
    }

    public void setTemplatepicture(String templatepicture) {
        this.templatepicture = templatepicture;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NewsMsgTemplate)) {
            return false;
        }
        NewsMsgTemplate other = (NewsMsgTemplate) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.NewsMsgTemplate[id=" + id + "]";
    }

}
